from copy import copy
class MAsort_byargs:
    def __init__(self,flags=[1,-1]):
        self.flags=flags
    def oncalc(self,*b,timekey=None):
        if None not in b:
            b=list(b)
            a=copy(b)
            b.sort()
            if a==b:
                return self.flags[1]
            b.sort(reverse=True)
            if a==b:
                return self.flags[0]
            else:
                return None
        else:
            return None

if __name__ == '__main__':


    MAsort0=MAsort()
    print(MAsort0.oncalc(10,20,30,40))
    print(MAsort0.oncalc(10, 30, 30, 40))
    print(MAsort0.oncalc(10, 40, 30, 40))
    print(MAsort0.oncalc(40, 30, 20, 10))
